Skip to content

[Merged by Bors] - feat(RingTheory/LocalRing/ResidueField/Basic): add algebra homs between residue fields#39716

Closed
tb65536 wants to merge 3 commits into
leanprover-community:masterfrom
tb65536:tb_locrngmap943
Closed

[Merged by Bors] - feat(RingTheory/LocalRing/ResidueField/Basic): add algebra homs between residue fields#39716
tb65536 wants to merge 3 commits into
leanprover-community:masterfrom
tb65536:tb_locrngmap943

Conversation

@tb65536

@tb65536 tb65536 commented May 22, 2026

Copy link
Copy Markdown
Contributor

This PR adds algebra homs between residue fields.


Open in Gitpod

@tb65536 tb65536 added awaiting-CI This PR does not pass CI yet. This label is automatically removed once it does. t-algebra Algebra (groups, rings, fields, etc) t-ring-theory Ring theory labels May 22, 2026
@github-actions

github-actions Bot commented May 22, 2026

Copy link
Copy Markdown

PR summary 671cfefae1

Import changes for modified files

No significant changes to the import graph

Import changes for all files
Files Import difference

Declarations diff

+ instance : IsLocalHom e.toAlgHom := by
+ mapAlgEquiv
+ mapAlgEquiv'
+ mapAlgEquiv'_residue
+ mapAlgEquiv_residue
+ mapAlgHom
+ mapAlgHom'
+ mapAlgHom'_residue
+ mapAlgHom_residue

You can run this locally as follows
## from your `mathlib4` directory:
git clone https://github.com/leanprover-community/mathlib-ci.git ../mathlib-ci

## summary with just the declaration names:
../mathlib-ci/scripts/pr_summary/declarations_diff.sh <optional_commit>

## more verbose report:
../mathlib-ci/scripts/pr_summary/declarations_diff.sh long <optional_commit>

The doc-module for scripts/pr_summary/declarations_diff.sh in the mathlib-ci repository contains some details about this script.


No changes to strong technical debt.
No changes to weak technical debt.

@github-actions github-actions Bot removed the awaiting-CI This PR does not pass CI yet. This label is automatically removed once it does. label May 22, 2026
See `mapAlgEquiv'` for a variant where the base ring `R` is also quotiented. -/
noncomputable def mapAlgEquiv (e : S ≃ₐ[R] T) : ResidueField S ≃ₐ[R] ResidueField T where
__ :=
-- todo: add better conversion between different spellings of the function in an `IsLocalHom`

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think now is a good time to try to address this. At the very least maybe we could add:

-- TODO Morally this is just `isLocalHom_equiv`: can we obviate the need for this instance?
instance (R A B : Type*) [CommSemiring R] [Semiring A] [Semiring B] [Algebra R A] [Algebra R B]
    (e : A ≃ₐ[R] B) : IsLocalHom e.toAlgHom := by
  have : IsLocalHom e.toRingEquiv := inferInstance
  exact ⟨this.map_nonunit⟩

to the appropriate upstream file to shield future users from this awkwardness?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added the instance, thanks!

I did play around a bit with a proper refactor. One the one hand, it seems that we are moving away from having defs take a FunLike argument (since then you actually get a bunch of different defs). But the issue is that if you switch IsLocalHom to take a plain function, then lemmas that require a ring hom won't fire on compositions (since the lemma will want the coercion of f.comp g, but the available instance will be the function composition of the coercions). So not sure what the best long-term plan is here.

@tb65536 tb65536 added the awaiting-CI This PR does not pass CI yet. This label is automatically removed once it does. label May 28, 2026
@ocfnash

ocfnash commented May 28, 2026

Copy link
Copy Markdown
Contributor

Thanks!

bors d+

@mathlib-bors

mathlib-bors Bot commented May 28, 2026

Copy link
Copy Markdown
Contributor

✌️ tb65536 can now approve this pull request. To approve and merge a pull request, simply reply with bors r+. More detailed instructions are available here.

@mathlib-triage mathlib-triage Bot added the delegated This pull request has been delegated to the PR author (or occasionally another non-maintainer). label May 28, 2026
@github-actions github-actions Bot removed the awaiting-CI This PR does not pass CI yet. This label is automatically removed once it does. label May 28, 2026
@tb65536

tb65536 commented May 28, 2026

Copy link
Copy Markdown
Contributor Author

bors r+

mathlib-bors Bot pushed a commit that referenced this pull request May 28, 2026
…en residue fields (#39716)

This PR adds algebra homs between residue fields.

Co-authored-by: tb65536 <thomas.l.browning@gmail.com>
@mathlib-bors

mathlib-bors Bot commented May 28, 2026

Copy link
Copy Markdown
Contributor

Pull request successfully merged into master.

Build succeeded:

@mathlib-bors mathlib-bors Bot changed the title feat(RingTheory/LocalRing/ResidueField/Basic): add algebra homs between residue fields [Merged by Bors] - feat(RingTheory/LocalRing/ResidueField/Basic): add algebra homs between residue fields May 28, 2026
@mathlib-bors mathlib-bors Bot closed this May 28, 2026
grunweg pushed a commit to grunweg/mathlib4 that referenced this pull request May 30, 2026
…en residue fields (leanprover-community#39716)

This PR adds algebra homs between residue fields.

Co-authored-by: tb65536 <thomas.l.browning@gmail.com>
b-mehta pushed a commit to b-mehta/mathlib4 that referenced this pull request Jun 2, 2026
…en residue fields (leanprover-community#39716)

This PR adds algebra homs between residue fields.

Co-authored-by: tb65536 <thomas.l.browning@gmail.com>
Bergschaf pushed a commit to Bergschaf/mathlib4 that referenced this pull request Jun 3, 2026
…en residue fields (leanprover-community#39716)

This PR adds algebra homs between residue fields.

Co-authored-by: tb65536 <thomas.l.browning@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

delegated This pull request has been delegated to the PR author (or occasionally another non-maintainer). t-algebra Algebra (groups, rings, fields, etc) t-ring-theory Ring theory

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants